package de.tudarmstadt.ukp.muip.fibqdojo.visitor;

import de.tudarmstadt.ukp.muip.fibqdojo.Sentence;
import de.tudarmstadt.ukp.muip.fibqdojo.SentenceToken;
import de.tudarmstadt.ukp.muip.fibqdojo.Token;
import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IStructureVisitor;
import de.tudarmstadt.ukp.muip.fibqdojo.japanese.JapaneseToken;

public class GetFormVisitor implements IStructureVisitor {

    private String form = "";

    public String getForm() {
        return form;
    }

    @Override
    public void visit(JapaneseToken token) {
        String[] forms = token.getForms();
        for (String f : forms) {
            form += f;
        }
    }

    @Override
    public void visit(Token token) {
        form = token.getForm();
    }

    @Override
    public void visit(SentenceToken token) {
        token.getToken().accept(this);
    }

    @Override
    public void visit(Sentence sentence) {
    }

}
